package main;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;



public class alarmStatus {	
	


	public static void main (String[] args) throws Exception{
			boolean execute = true;
			while(execute){
				Thread.sleep(10000);
				getAlarmStatus();
			}
	}
	
	private static void getAlarmStatus(){
		try {
		    // Create a URL for the desired page
		    URL url = new URL("http://localhost:8080/ece1779/servlet/AlarmStatus");
		    
		    // Read all the text returned by the server
		    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
		    String str;
		    while ((str = in.readLine()) != null) {
		        System.out.println(str);
		    }
		    in.close();
		} catch (MalformedURLException e) {
		} catch (IOException e) {
		}
	}
}
